package cn.jy.nvr.controller;

import cn.jy.nvr.domain.UpdateApkInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UpdateApkController
{

  @Value("${url}")
  private String url;

  @Value("${versionCode}")
  private String versionCode;

  @Value("${updateMessage}")
  private String updateMessage;

  @RequestMapping({"update"})
  @ResponseBody
  public UpdateApkInfo updateApk()
  {
    UpdateApkInfo updateApkInfo = new UpdateApkInfo();
    updateApkInfo.setUrl(url);
    updateApkInfo.setVersionCode(versionCode);
    updateApkInfo.setUpdateMessage(updateMessage);
    return updateApkInfo;
  }
}